package BehaviorDesignPattern.ChainOfResponsibilityPattern;

// 具体处理者：经理，可以审批额度在5000元以下的请求
public class Manager extends Approver {
    @Override
    public void approveRequest(int amount) {
        if (amount <= 5000) {
            System.out.println("经理批准了" + amount + "元的费用报销请求。");
        } else if (nextApprover != null) {
            System.out.println("经理无法批准" + amount + "元的请求，交由上级处理...");
            nextApprover.approveRequest(amount);
        }
    }
}
